package com.ruoyi.ewem.domain;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 质检表
 * @TableName ewem_quality
 */
@TableName(value ="ewem_quality")
@Data
public class Quality extends BaseEntity implements Serializable {
    /**
     * 质检id
     */
    @Excel(name = "质检id")
    @TableId(type = IdType.AUTO)
    private Integer qualityId;

    /**
     * 作物id
     */
    private Integer productId;

    /**
     * 批次(原料-产品批次)
     */
    @Excel(name = "批次")
    private String batchNum;

    @TableField(exist = false)
    private String processName;

    /**
     * 产品id
     */
    private Integer processId;

    /**
     * 生产日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date productionTime;

    /**
     * 检测日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date qualityTime;

    /**
     * 检测人
     */
    @Excel(name = "检测人")
    private String qualityName;

    /**
     * 检测结果(0:合格 1:不合格 2:待质检)
     */
    @ExcelIgnore
    private String qualityResult;

    /**
     * 质检照片图片
     */
    @ExcelIgnore
    private String avatar;

    /**
     * 物料id
     */
    private Integer goodsMaterialId;

    /**
     * 司机id
     */
    private Integer driverId;

    /**
     * 生产商id
     */
    private Integer firmId;

    /**
     * 删除标记(0:存在 1:删除)
     */
    @ExcelIgnore
    @TableLogic
    private String delFlag;

    /**
     * 创建人
     */
    @ExcelIgnore
    private String createBy;

    /**
     * 创建时间
     */
    @ExcelIgnore
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 修改人
     */
    @ExcelIgnore
    private String updateBy;

    /**
     * 修改时间
     */
    @ExcelIgnore
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 备注
     */
    @ExcelIgnore
    private String remark;

    @Excel(name = "作物名称")
    @TableField(exist = false)
    private String productName;
    @Excel(name = "加工厂商名称")
    @TableField(exist = false)
    private String firmName;
    @Excel(name = "司机名称")
    @TableField(exist = false)
    private String driversName;
    @Excel(name = "物料名称")
    @TableField(exist = false)
    private String materialName;


    @TableField(exist = false)
    private String name;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
